<style>
    .time {
        font-size: 13px;
        color: #999;
    }

    .bottom {
        margin-top: 13px;
        line-height: 12px;
    }

    .button {
        padding: 0;
        float: right;
    }

    .image {
        width: 100%;
        display: block;
    }

    .clearfix:before,
    .clearfix:after {
        display: table;
        content: "";
    }

    .clearfix:after {
        clear: both
    }
</style>
<template>
    <el-container>
        <el-header class="mag-header">
            <h3> 阿斯扥</h3>
        </el-header>
        <el-main>
            <div class="main-box">
                <el-form ref="form" label-width="20px" size="medium">

                    <el-form-item label="" prop="role_id">
                        <span class="help-text">开启关闭的快捷键为 control(ctr) + /</span>
                        <el-button @click="to_edit_role" type="primary">{{is_open?'关闭':'开启'}}权限管理模式</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </el-main>
    </el-container>

</template>
<script>
    //这里定义组件
    Rap.define([], {
        data: function () {
            return {
                role_id: '',
                is_open:false
            }
        },
        created: function () {
            this.is_open=location.href.indexOf('vue_role_edit_model=1')>0;
        },
        methods: {
            to_edit_role: function () {
                if(this.is_open){
                    location.search='';
                }else{
                    location.search='?vue_role_edit_model=1';
                }
            }
        }
    })
</script>